﻿@model IEnumerable<Home.Site.Models.DataLayer.Offer>

@{
    ViewBag.Title = "Index";
}
<table class="table-hover table table-condensed table-bordered">
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.idoffer)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.title)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.ip)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.dateOffer)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.description)
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.idoffer)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.title)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.ip)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.dateOffer)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.description)
        </td>
        <td>
            <form action="/Offer/Delete/@item.idoffer" method="post" novalidate="novalidate" style="margin: 0;">
                    @Html.AntiForgeryToken()
                    <input type="submit" class="btn-link" value="Удалить">
             </form>
        </td>
    </tr>
}

</table>
